

/* 纵表转制 */

SELECT OBJECTID,  
       MAX(DECODE(T.CODE,'ATTR1',T.value)) AS ATTR1,  
       MAX(DECODE(T.CODE,'ATTR2',T.value)) AS ATTR2,  
       MAX(DECODE(T.CODE,'ATTR3',T.value)) AS ATTR3  
  FROM C_PARAMETERPOOL T  
 GROUP BY OBJECTID;  
 
---------------
drop table C_PARAMETERPOOL cascade constraints;

/*==============================================================*/
/* Table: C_PARAMETERPOOL                                       */
/*==============================================================*/
create table C_PARAMETERPOOL  (
   ID                   NUMBER                          not null,
   OBJECTID             NUMBER,
   CODE                 VARCHAR2(255),
   VALUE                VARCHAR2(4000),
   constraint PK_C_PARAMETERPOOL primary key (ID)
);

